package com.ysy.persimmons.common.constant;


public class RedisConstants {

    /**
     * 验证码 KEY 前缀.构建验证码 KEY
     */
    private static final String VERIFICATION_CODE_KEY_PREFIX = "verification:code:";

    public static String buildVerificationCodeKey(String phone) {
        return VERIFICATION_CODE_KEY_PREFIX + phone;
    }


    /**
     * 用户信息数据 KEY 前缀 - 构建角色信息对应的 KEY
     */
    private static final String USER_INFO_KEY_PREFIX = "user:info:";

    public static String buildUserInfoKey(Long userId) {
        return USER_INFO_KEY_PREFIX + userId;
    }


    /**
     * note数据 KEY 前缀 - 构建note信息对应的 KEY
     */
    private static final String NOTE_INFO_KEY_PREFIX = "note:info:";
    public static String buildNoteCacheKey(Long id) {
        return NOTE_INFO_KEY_PREFIX + id;
    }



}
